package com.jbp.controller;

import com.jbp.service.TecentMsgService;
import com.jbp.utils.R;
import com.jbp.utils.TLSSigAPIv2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 腾讯通信
 */
@RestController
@RequestMapping("/rest/tecentMsg")
@ApiIgnore
public class TecentMsgController {

    @Autowired
    private TecentMsgService tecentMsgService;

    @GetMapping("/getSign")
    public R getSign(@RequestAttribute("userId") Integer userId){
        String sign = tecentMsgService.getSign(userId.toString());
        return R.ok(sign, sign);
    }
}
